#include <iostream>
#include "bignum.h"

#define MAX_FIB 2500

int
main()
{
//  bignum a, b, c, d;
  bignum fib[MAX_FIB];
/*
  a = "1234556";

  std::cout << "a = " << a << "\n";

  b = 1234;
  c = 4321;

  d = b + c;

  std::cout << "d = " << d << "\n";

  a = "385858924858294985298481737485898842348";
  b = "3842871348975778967893457217847174275478472";
  c = "9509692848127478581847540060929495848523452";
  std::cout << a << " + " << b << " + " << c << " = " << a + b + c << '\n';

  // std::cout << "13439494949191993" + "3193292929292294331"; compile-time error

  std::cout << bignum("494901093919104") + bignum("4959191929393051010101") << '\n';
*/
  for (int i = 0; i < MAX_FIB; i++) {
    if (i == 0)
      fib[i] = 0;
    else if (i == 1)
      fib[i] = 1;
    else
      fib[i] = fib[i-1] + fib[i-2];
    if (i == 2499)
    std::cout << "Fib(" << i << ") = " << fib[i] << '\n';
  }

/*
  for (int i = 0; i < MAX_FIB; i++) {
    if (i == 0)
      fib[i] = 1;
    else
      fib[i] = fib[i-1] + fib[i-1];

    std::cout << "2**" << i << " = " << fib[i] << '\n';
  }
*/
  return 0;

}
